import requests


# 封装ihrm Api
class IHRM_Api:
    @classmethod
    def ihrm_login(cls):
        url = "http://ihrm-test.itheima.net/api/sys/login"
        head = {"Content-Type": "application/json"}
        body = {"mobile": "13800000002","password": "123456"}
        reques = requests.post(url=url, headers=head, json=body)
        token = reques.json()['data']
        return token
